<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
   <title>Vorpal: Scripting Language Reference</title>
   <link rel="stylesheet" type="text/css" href="styles.css" media="screen" />
</head>
<body>

<!--TOP-NAV-->
	<h1>Vorpal: Scriping Language Reference (Preliminary)</h1>
	<div id="top-nav"><ul id="top-nav-list">
		<li></li>
		<li> - <a href="fundamentals.html">Fundamentals</a></li>
		<li> - <a href="keywords.html">Keywords</a></li>
		<li> - <a href="types.html">Types</a></li>
		<li> - <a href="operators.html">Operators</a></li>
		<li> - <a href="methods.html">Methods</a></li>
		<li> - <a href="objects.html">Objects</a></li>
		<li> - </li>
	</ul></div>
<!--END-TOP-NAV-->

	<h2>Methods</h2>
	<p>
		All methods take <a href="keywords.html#self">self</a> as an first
		invisible argument, any number of additional arguments, and return exactly
		one object (self if nothing else).
	</p>
	<p>
		Vorpal has built-in methods for existing types. They are outlined below.
	</p>
	
	<h3><a name="boolean">Boolean Methods</a></h3>
	
	<h4>Print</h4>
	<p>
		<code><i>x</i>.print()</code>
	</p>
	<p>
		Returns a string '<code>TRUE</code>' or '<code>FALSE</code>' depending on
		the value of <code><i>x</i></code> and print it to screen.
	</p>
	
	<h3><a name="number">Number Methods</a></h3>
	
	<h4>Print</h4>
	<p>
		<code><i>x</i>.print()</code>
	</p>
	<p>
		Returns a string giving the value of <code><i>x</i></code>,
		<code>'Number: <i>x</i>'</code> and print it to screen.
	<p>
	
	<h4>Absolute Value</h4>
	<p>
		<code><i>x</i>.abs()</code>
	<p>
	<p>
		Returns a number, the absolute value of <code><i>x</i></code>.
	</p>
	
	<h4>Floor</h4>
	<p>
		<code><i>x</i>.floor()</code>
	</p>
	<p>
		Returns a number, the nearest integer less than <code><i>x</i></code>.
	<p>
	
	<h4>Ceil</h4>
	<p>
		<code><i>x</i>.ceil()</code>
	</p>
	<p>
		Returns a number, the nearest integer greater than <code><i>x</i></code>.
	</p>
	
	<h4>Round</h4>
	<p>
		<code><i>x</i>.round()</code>
	</p>
	<p>
		Returns a number, the nearest integer to <code><i>x</i></code>.
	</p>
	
	<h4>Square Root</h4>
	<p>
		<code><i>x</i>.sqrt()</code>
	</p>
	<p>
		Returns a number, the square root of <code><i>x</i></code>.
	</p>
	
	<h4>Exponential</h4>
	<p>
		<code><i>x</i>.exp()</code>
	</p>
	<p>
		Returns a number, the exponential function of <code><i>x</i></code>.
	</p>
	
	<h4>Natural Logarithm</h4>
	<p>
		<code><i>x</i>.log()</code>
	</p>
	<p>
		Returns a number, the natural logarithm of <code><i>x</i></code>.
	</p>
	
	<h4>Base 10 Logarithm</h4>
	<p>
		<code><i>x</i>.log10()</code>
	</p>
	<p>
		Returns a number, the base 10 logarithm of <code><i>x</i></code>.
	</p>
	
	<h3><a name="string">String Methods</a></h3>
	
	<h4>Print</h4>
	<p>
		<code><i>x</i>.print()</code>
	</p>
	<p>
		Returns the string <code><i>x</i></code> and print it to screen.
	</p>
	
	<h4>Length</h4>
	<p>
		<code><i>x</i>.length()</code>
	</p>
	<p>
		Returns a number, the length of the string <code><i>x</i></code>.
	</p>
	
	<h4>Lexicographical Comparison</h4>
	<p>
		<code><i>x</i>.strcmp(<i>expression</i>)</code>
	</p>
	<p>
		Returns a number, the lexicographical difference between the string
		<code><i>x</i></code> and the string form of <i>expression</i>.
	</p>

	<h4>Subset</h4>
	<p>
		<code><i>x</i>.substring(<i>start</i>)</code><br>
		<code><i>x</i>.substring(<i>start</i>,<i>end</i>)</code>
	</p>
	<p>
		Returns a subset of the string <code><i>x</i></code>, beginning at the
		position <i>start</i> (number) and ending at either the last character or
		at position <i>end</i> (number).<br>
		If no parameters are specified, the original string is returned.
	</p>
	
	<h4>Left Subset</h4>
	<p>
		<code><i>x</i>.left(<i>count</i>)</code>
	<p>
	<p>
		Returns the left most subset of the string <code><i>x</i></code> to a
		total of <i>count</i> (number) characters.
	</p>
	
	<h4>Find Substring</h4>
	<p>
		<code><i>x</i>.find(<i>expression</i>)</code><br>
		<code><i>x</i>.find(<i>expression</i>,<i>start</i>)</code><br>
		<code><i>x</i>.find(<i>expression</i>,<i>start</i>,<i>end</i>)</code>
	</p>
	<p>
		Finds the string form of <i>expression</i> inside the string
		<code><i>x</i></code> and return the position (number) of the first
		occurence if found. Otherwise, return a Boolean FALSE.<br>
		The position to start and end the search can be specified using
		<i>start</i> and <i>end</i> (numbers) respectively.
	</p>
	
	<h3><a name="boolean">System Methods</a></h3>
	<p>
		These are methods for the Vorpal system object.
	</p>
	
	<h4>Hello</h4>
	<p>
		<code>sys.hello()</code>
	</p>
	<p>
		Prints '<code>hello</code>' to screen.
	<p>
	
	<h4>True</h4>
	<p>
		<code>sys.true()</code>
	</p>
	<p>
		Returns the Boolean value TRUE.
	</p>
	
	<h4>False</h4>
	<p>
		<code>sys.false()</code>
	</p>
	<p>
		Returns the Boolean value FALSE.
	</p>
</body>
</html>